/*
 *	DjoltToken.h
 *
 *	David Janes
 *	Discover Anywhere Mobile
 *	March 2010
 *
 *	Copyright 2010 Discover Anywhere Mobile
 *
 *	Purpose:
 *	This parses Django-like variable expressions
 *
 *	Programmers:
 *	Modify this if that's not working out (e.g. we may
 *	want this to be able to recognize boolean expressions)
 */

#import <Foundation/Foundation.h>

typedef enum {
	DjoltTokenTypeAtom,
	DjoltTokenTypeQuote
} DjoltTokenType;

@interface DjoltToken : NSObject
{
@public
	int			ttype;
	NSString*	tvalue;
	NSArray*	filters;
}

@property(nonatomic,retain) NSString*   tvalue;
@property(nonatomic,retain) NSArray*	filters;

+ (NSArray*) tokenize:(NSString*)_str;
- (id) initWithQuote:(NSString*)_quote;
- (id) initWithAtom:(NSString*)_atom;
- (NSString*) render:(DjoltContext*)_context escape:(BOOL)_must_escape;
@end


